<template>
	<view class="map">
		<!-- xmWrtIHCLW0nMcwvumdpLnLqE0Oes1as -->
		<map :longitude="longitude" :latitude="latitude" class="maps" :show-compass="true" :show-location="true">
	
		</map>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				latitude:new Number(),
				longitude:new Number(),
			
			};
		},
		onLoad() {
		//获得地理定位信息
								uni.getLocation({
									type: 'gcj02',
									success: (resp) =>{
										console.log(resp);
										//保存纬度数据
										this.latitude = resp.latitude;
										//保存经度度数据
										this.longitude = resp.longitude;
										
									},
									fail: function(resp) {
										console.log(resp);}
								});

		}
	}
</script>

<style lang="less" scoped>
 .map{
	 width: 100vw;
	 height: 100vh;
 }
.maps{
	width: 100%;
	height: 100%;
}
</style>
